package com.example.administrator.capital.login;


import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.administrator.capital.MainActivity;
import com.example.administrator.capital.R;
import com.example.administrator.capital.base.BaseActivity;
import com.example.administrator.capital.utils.PreferenceManager;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.bingoogolapple.bgabanner.BGABanner;
import cn.bingoogolapple.bgabanner.BGALocalImageSize;

public class GuideActivity extends BaseActivity {


    @BindView(R.id.banner_guide_foreground)
    BGABanner mBannerGuideForeground;
    @BindView(R.id.skip)
    TextView mSkip;
    @BindView(R.id.enter)
    Button mEnter;

    @Override
    public int getLayoutId() {
        return R.layout.activity_guide;
    }

    @Override
    public void initView() {

    }

    @Override
    public void setListener() {
        mBannerGuideForeground.setEnterSkipViewIdAndDelegate(R.id.enter, R.id.skip, new BGABanner.GuideDelegate() {
            @Override
            public void onClickEnterOrSkip() {
                PreferenceManager.instance().saveIsFirstIn(true);
                showActivity(LoginActivity.class, null);
                finish();
            }
        });
    }

    @Override
    public void setData() {
        BGALocalImageSize localImageSize = new BGALocalImageSize(1440, 2560, 480, 800);
        mBannerGuideForeground.setData(localImageSize, ImageView.ScaleType.CENTER_CROP,
                R.drawable.banner_1,
                R.drawable.banner_2,
                R.drawable.banner_3);
    }
    @Override
    protected void onResume() {
        super.onResume();
        mBannerGuideForeground.setBackgroundResource(android.R.color.white);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @Override
    public void onClick(View view) {

    }
}
